﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000209 RID: 521
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class ChessRogueCellUpdateNotify : IMessage<ChessRogueCellUpdateNotify>, IMessage, IEquatable<ChessRogueCellUpdateNotify>, IDeepCloneable<ChessRogueCellUpdateNotify>, IBufferMessage
	{
		// Token: 0x170006D6 RID: 1750
		// (get) Token: 0x0600176A RID: 5994 RVA: 0x00042CD3 File Offset: 0x00040ED3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<ChessRogueCellUpdateNotify> Parser
		{
			get
			{
				return ChessRogueCellUpdateNotify._parser;
			}
		}

		// Token: 0x170006D7 RID: 1751
		// (get) Token: 0x0600176B RID: 5995 RVA: 0x00042CDA File Offset: 0x00040EDA
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return ChessRogueCellUpdateNotifyReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170006D8 RID: 1752
		// (get) Token: 0x0600176C RID: 5996 RVA: 0x00042CEC File Offset: 0x00040EEC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return ChessRogueCellUpdateNotify.Descriptor;
			}
		}

		// Token: 0x0600176D RID: 5997 RVA: 0x00042CF3 File Offset: 0x00040EF3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCellUpdateNotify()
		{
		}

		// Token: 0x0600176E RID: 5998 RVA: 0x00042D08 File Offset: 0x00040F08
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCellUpdateNotify(ChessRogueCellUpdateNotify other) : this()
		{
			this.reason_ = other.reason_;
			this.cellList_ = other.cellList_.Clone();
			this.boardId_ = other.boardId_;
			this.modifierSource_ = other.modifierSource_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600176F RID: 5999 RVA: 0x00042D61 File Offset: 0x00040F61
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCellUpdateNotify Clone()
		{
			return new ChessRogueCellUpdateNotify(this);
		}

		// Token: 0x170006D9 RID: 1753
		// (get) Token: 0x06001770 RID: 6000 RVA: 0x00042D69 File Offset: 0x00040F69
		// (set) Token: 0x06001771 RID: 6001 RVA: 0x00042D71 File Offset: 0x00040F71
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ChessRogueCellUpdateReason Reason
		{
			get
			{
				return this.reason_;
			}
			set
			{
				this.reason_ = value;
			}
		}

		// Token: 0x170006DA RID: 1754
		// (get) Token: 0x06001772 RID: 6002 RVA: 0x00042D7A File Offset: 0x00040F7A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<ChessRogueCell> CellList
		{
			get
			{
				return this.cellList_;
			}
		}

		// Token: 0x170006DB RID: 1755
		// (get) Token: 0x06001773 RID: 6003 RVA: 0x00042D82 File Offset: 0x00040F82
		// (set) Token: 0x06001774 RID: 6004 RVA: 0x00042D8A File Offset: 0x00040F8A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint BoardId
		{
			get
			{
				return this.boardId_;
			}
			set
			{
				this.boardId_ = value;
			}
		}

		// Token: 0x170006DC RID: 1756
		// (get) Token: 0x06001775 RID: 6005 RVA: 0x00042D93 File Offset: 0x00040F93
		// (set) Token: 0x06001776 RID: 6006 RVA: 0x00042D9B File Offset: 0x00040F9B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RogueModifierSourceType ModifierSource
		{
			get
			{
				return this.modifierSource_;
			}
			set
			{
				this.modifierSource_ = value;
			}
		}

		// Token: 0x06001777 RID: 6007 RVA: 0x00042DA4 File Offset: 0x00040FA4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as ChessRogueCellUpdateNotify);
		}

		// Token: 0x06001778 RID: 6008 RVA: 0x00042DB4 File Offset: 0x00040FB4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(ChessRogueCellUpdateNotify other)
		{
			return other != null && (other == this || (this.Reason == other.Reason && this.cellList_.Equals(other.cellList_) && this.BoardId == other.BoardId && this.ModifierSource == other.ModifierSource && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06001779 RID: 6009 RVA: 0x00042E24 File Offset: 0x00041024
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Reason != ChessRogueCellUpdateReason.None)
			{
				num ^= this.Reason.GetHashCode();
			}
			num ^= this.cellList_.GetHashCode();
			if (this.BoardId != 0U)
			{
				num ^= this.BoardId.GetHashCode();
			}
			if (this.ModifierSource != RogueModifierSourceType.RogueModifierSourceNone)
			{
				num ^= this.ModifierSource.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600177A RID: 6010 RVA: 0x00042EAF File Offset: 0x000410AF
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600177B RID: 6011 RVA: 0x00042EB7 File Offset: 0x000410B7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600177C RID: 6012 RVA: 0x00042EC0 File Offset: 0x000410C0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.BoardId != 0U)
			{
				output.WriteRawTag(8);
				output.WriteUInt32(this.BoardId);
			}
			if (this.Reason != ChessRogueCellUpdateReason.None)
			{
				output.WriteRawTag(64);
				output.WriteEnum((int)this.Reason);
			}
			if (this.ModifierSource != RogueModifierSourceType.RogueModifierSourceNone)
			{
				output.WriteRawTag(72);
				output.WriteEnum((int)this.ModifierSource);
			}
			this.cellList_.WriteTo(ref output, ChessRogueCellUpdateNotify._repeated_cellList_codec);
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600177D RID: 6013 RVA: 0x00042F48 File Offset: 0x00041148
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Reason != ChessRogueCellUpdateReason.None)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Reason);
			}
			num += this.cellList_.CalculateSize(ChessRogueCellUpdateNotify._repeated_cellList_codec);
			if (this.BoardId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.BoardId);
			}
			if (this.ModifierSource != RogueModifierSourceType.RogueModifierSourceNone)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.ModifierSource);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600177E RID: 6014 RVA: 0x00042FCC File Offset: 0x000411CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(ChessRogueCellUpdateNotify other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Reason != ChessRogueCellUpdateReason.None)
			{
				this.Reason = other.Reason;
			}
			this.cellList_.Add(other.cellList_);
			if (other.BoardId != 0U)
			{
				this.BoardId = other.BoardId;
			}
			if (other.ModifierSource != RogueModifierSourceType.RogueModifierSourceNone)
			{
				this.ModifierSource = other.ModifierSource;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600177F RID: 6015 RVA: 0x00043041 File Offset: 0x00041241
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06001780 RID: 6016 RVA: 0x0004304C File Offset: 0x0004124C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 64U)
				{
					if (num == 8U)
					{
						this.BoardId = input.ReadUInt32();
						continue;
					}
					if (num == 64U)
					{
						this.Reason = (ChessRogueCellUpdateReason)input.ReadEnum();
						continue;
					}
				}
				else
				{
					if (num == 72U)
					{
						this.ModifierSource = (RogueModifierSourceType)input.ReadEnum();
						continue;
					}
					if (num == 90U)
					{
						this.cellList_.AddEntriesFrom(ref input, ChessRogueCellUpdateNotify._repeated_cellList_codec);
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x040009BC RID: 2492
		private static readonly MessageParser<ChessRogueCellUpdateNotify> _parser = new MessageParser<ChessRogueCellUpdateNotify>(() => new ChessRogueCellUpdateNotify());

		// Token: 0x040009BD RID: 2493
		private UnknownFieldSet _unknownFields;

		// Token: 0x040009BE RID: 2494
		public const int ReasonFieldNumber = 8;

		// Token: 0x040009BF RID: 2495
		private ChessRogueCellUpdateReason reason_;

		// Token: 0x040009C0 RID: 2496
		public const int CellListFieldNumber = 11;

		// Token: 0x040009C1 RID: 2497
		private static readonly FieldCodec<ChessRogueCell> _repeated_cellList_codec = FieldCodec.ForMessage<ChessRogueCell>(90U, ChessRogueCell.Parser);

		// Token: 0x040009C2 RID: 2498
		private readonly RepeatedField<ChessRogueCell> cellList_ = new RepeatedField<ChessRogueCell>();

		// Token: 0x040009C3 RID: 2499
		public const int BoardIdFieldNumber = 1;

		// Token: 0x040009C4 RID: 2500
		private uint boardId_;

		// Token: 0x040009C5 RID: 2501
		public const int ModifierSourceFieldNumber = 9;

		// Token: 0x040009C6 RID: 2502
		private RogueModifierSourceType modifierSource_;
	}
}
